<?php

if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Track_mod extends CI_Model
{
	public function __construct()
	{
		parent::__construct();
	}
	
	function getgsTrackBygsid($gsid)
	{
		$sql = "SELECT * 
				FROM tms_track a
				LEFT JOIN tms_admin b ON a.uid = b.m_id
				LEFT JOIN tms_customer c ON a.cid = c.id
				WHERE a.gsid = $gsid
				ORDER BY a.date DESC";
		$query = $this->db->query($sql);
		return $query->result_array();
	}
	
	function InsertTrack($data)
	{
		return $this->db->insert('tms_track',$data);
	}
	
	function InsertTask($cs)
	{
		return $this->db->insert('tms_task',$cs);
	}
}
?>